﻿using System;

namespace _509_submissions
{
    class Program
    {
        static void Main (string[] args)
        {
            Console.WriteLine (new Solution().Fib(2));
        }
    }

    public class Solution
    {
        public int Fib (int N)
        {
            int count = 0;
            int n1 = 0;
            int n2 = 1;
            int sum = 0;
            while (N > count)
            {
                if (count % 2 == 0)
                {
                    n1 = sum;
                    sum += n2;
                }
                else
                {
                    n2 = sum;
                    sum += n1;
                }
                count++;
            }

            return sum;
        }
    }
}
